
package JET.physics.engine;

import JET.physics.RSpring;
import JET.physics.interfaces.SceneTreeNode;
import java.util.ArrayList;

/**
 *
 * @author 057Ry
 */
public class RSpringsTreeNode implements SceneTreeNode {

    ArrayList<RSpring> rSpringList;

    public RSpringsTreeNode(ArrayList<RSpring> rSpringList) {
        this.rSpringList = rSpringList;
    }

    public SceneTreeNode getChild(int index) {
        return (SceneTreeNode) rSpringList.get(index);
    }

    public int getChildCount() {
        return rSpringList.size();
    }

    public boolean isLeaf() {
        return rSpringList.isEmpty();
    }

    public int getIndexOfChild(Object child) {
        return rSpringList.indexOf(child);
    }
    public void resetNodeValue(Object o) {}

    public String toString() {
        return "Rotary springs";
    }
}
